package visitor.formatters;

import visitor.Formatter;
import visitor.billtypes.BillType1;
import visitor.billtypes.BillType2;
import visitor.billtypes.BillType3;
import visitor.billtypes.BillType4;

public class DefaultFormatter implements Formatter {
    @Override
    public void format(BillType1 billType1) {
        String value = billType1.getValue();
        System.out.println(value);
    }

    @Override
    public void format(BillType2 billType2) {
        Double value = billType2.getValue();
        System.out.println(value+"D");
    }

    @Override
    public void format(BillType3 billType3) {
        Float value = billType3.getValue();
        System.out.println(value+"L");
    }

    @Override
    public void format(BillType4 billType4) {
        Integer value = billType4.getValue();
        System.out.println(value+"I");

    }
}
